{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Pandas计算同比环比指标的3种方法\n",
    "\n",
    "#### 同比和环比：环比和同比用于描述统计数据的变化情况\n",
    "* 环比：表示本次统计段与相连的上次统计段之间的比较。\n",
    "    - 比如2010年中国第一季度GDP为G2010Q1亿元，第二季度GDP为G2010Q2亿元，则第二季度GDP环比增长（G2010Q2-G2010Q1)/G2010Q1；\n",
    "* 同比：即同期相比，表示某个特定统计段今年与去年之间的比较。\n",
    "    - 比如2009年中国第一季度GDP为G2009Q1亿元，则2010年第一季度的GDP同比增长为（G2010Q1-G2009Q1)/G2009Q1。\n",
    "\n",
    "<img src=\"./other_files/tongbi_huanbi.jpg\" style=\"margin-left:0px; \"/>\n",
    "\n",
    "\n",
    "演示步骤：\n",
    "0. 读取连续3年的天气数据\n",
    "1. 方法1：pandas.Series.pct_change\n",
    "2. 方法2：pandas.Series.shift\n",
    "3. 方法3：pandas.Series.diff\n",
    "\n",
    "pct_change、shift、diff，都实现了跨越多行的数据计算"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 0. 读取连续3年的天气数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "fpath = \"./datas/beijing_tianqi/beijing_tianqi_2017-2019.csv\"\n",
    "df = pd.read_csv(fpath, index_col=\"ymd\", parse_dates=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bWendu</th>\n",
       "      <th>yWendu</th>\n",
       "      <th>tianqi</th>\n",
       "      <th>fengxiang</th>\n",
       "      <th>fengli</th>\n",
       "      <th>aqi</th>\n",
       "      <th>aqiInfo</th>\n",
       "      <th>aqiLevel</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ymd</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>2017-01-01</td>\n",
       "      <td>5℃</td>\n",
       "      <td>-3℃</td>\n",
       "      <td>霾~晴</td>\n",
       "      <td>南风</td>\n",
       "      <td>1-2级</td>\n",
       "      <td>450</td>\n",
       "      <td>严重污染</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-01-02</td>\n",
       "      <td>7℃</td>\n",
       "      <td>-6℃</td>\n",
       "      <td>晴~霾</td>\n",
       "      <td>南风</td>\n",
       "      <td>1-2级</td>\n",
       "      <td>246</td>\n",
       "      <td>重度污染</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-01-03</td>\n",
       "      <td>5℃</td>\n",
       "      <td>-5℃</td>\n",
       "      <td>霾</td>\n",
       "      <td>南风</td>\n",
       "      <td>1-2级</td>\n",
       "      <td>320</td>\n",
       "      <td>严重污染</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           bWendu yWendu tianqi fengxiang fengli  aqi aqiInfo  aqiLevel\n",
       "ymd                                                                    \n",
       "2017-01-01     5℃    -3℃    霾~晴        南风   1-2级  450    严重污染         6\n",
       "2017-01-02     7℃    -6℃    晴~霾        南风   1-2级  246    重度污染         5\n",
       "2017-01-03     5℃    -5℃      霾        南风   1-2级  320    严重污染         6"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 替换掉温度的后缀℃\n",
    "df[\"bWendu\"] = df[\"bWendu\"].str.replace(\"℃\", \"\").astype('int32')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bWendu</th>\n",
       "      <th>yWendu</th>\n",
       "      <th>tianqi</th>\n",
       "      <th>fengxiang</th>\n",
       "      <th>fengli</th>\n",
       "      <th>aqi</th>\n",
       "      <th>aqiInfo</th>\n",
       "      <th>aqiLevel</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ymd</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>2017-01-01</td>\n",
       "      <td>5</td>\n",
       "      <td>-3℃</td>\n",
       "      <td>霾~晴</td>\n",
       "      <td>南风</td>\n",
       "      <td>1-2级</td>\n",
       "      <td>450</td>\n",
       "      <td>严重污染</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-01-02</td>\n",
       "      <td>7</td>\n",
       "      <td>-6℃</td>\n",
       "      <td>晴~霾</td>\n",
       "      <td>南风</td>\n",
       "      <td>1-2级</td>\n",
       "      <td>246</td>\n",
       "      <td>重度污染</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-01-03</td>\n",
       "      <td>5</td>\n",
       "      <td>-5℃</td>\n",
       "      <td>霾</td>\n",
       "      <td>南风</td>\n",
       "      <td>1-2级</td>\n",
       "      <td>320</td>\n",
       "      <td>严重污染</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            bWendu yWendu tianqi fengxiang fengli  aqi aqiInfo  aqiLevel\n",
       "ymd                                                                     \n",
       "2017-01-01       5    -3℃    霾~晴        南风   1-2级  450    严重污染         6\n",
       "2017-01-02       7    -6℃    晴~霾        南风   1-2级  246    重度污染         5\n",
       "2017-01-03       5    -5℃      霾        南风   1-2级  320    严重污染         6"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 新的df，为每个月的平均最高温\n",
    "df = df[[\"bWendu\"]].resample(\"M\").mean()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 将索引按照日期升序排列\n",
    "df.sort_index(ascending=True, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bWendu</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ymd</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>2017-01-31</td>\n",
       "      <td>3.322581</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-02-28</td>\n",
       "      <td>7.642857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-03-31</td>\n",
       "      <td>14.129032</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-04-30</td>\n",
       "      <td>23.700000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-05-31</td>\n",
       "      <td>29.774194</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               bWendu\n",
       "ymd                  \n",
       "2017-01-31   3.322581\n",
       "2017-02-28   7.642857\n",
       "2017-03-31  14.129032\n",
       "2017-04-30  23.700000\n",
       "2017-05-31  29.774194"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "DatetimeIndex(['2017-01-31', '2017-02-28', '2017-03-31', '2017-04-30',\n",
       "               '2017-05-31', '2017-06-30', '2017-07-31', '2017-08-31',\n",
       "               '2017-09-30', '2017-10-31', '2017-11-30', '2017-12-31',\n",
       "               '2018-01-31', '2018-02-28', '2018-03-31', '2018-04-30',\n",
       "               '2018-05-31', '2018-06-30', '2018-07-31', '2018-08-31',\n",
       "               '2018-09-30', '2018-10-31', '2018-11-30', '2018-12-31',\n",
       "               '2019-01-31', '2019-02-28', '2019-03-31', '2019-04-30',\n",
       "               '2019-05-31', '2019-06-30', '2019-07-31', '2019-08-31',\n",
       "               '2019-09-30', '2019-10-31', '2019-11-30', '2019-12-31'],\n",
       "              dtype='datetime64[ns]', name='ymd', freq='M')"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x13d8d77dc48>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAESCAYAAADkJY5uAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3dd3ib13nw/+8BQHCA4ASHOCSSGiRF7WVZkh3b8mrieCR2U7dO7ezlNEnTpu+vvzZx0nS4dZJmOYnjmVH3zaxjp/GQbMfWskRJlGSJlERxiwPcBDcBnPcPADRNc4AkgOd5gPO5Ll0SIYwjPcTNg/vc5z5CSomiKIpiPCatB6AoiqIsjgrgiqIoBqUCuKIoikGpAK4oimJQKoAriqIYlArgiqIoBmWJ5Is5HA5ZVFQUyZdUFEUxvOPHj3dJKbOm3x7RAF5UVERlZWUkX1JRFMXwhBCNM92uUiiKoigGpQK4oiiKQakAriiKYlAqgCuKohiUCuCKoigGpQK4oiiKQakArsScCY9X6yEoSkioAK7ElEudg2x44EUe+N1ZFchjQEPXEF979hy/O9Wq9VDCIqIbeRRFa38408bIhIcnDzVwrm2Ah/9iC47keK2HpYTYy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X+iP5jlDmpjTyKoigGpY5UUxRFMSgVwBVFUQxKBXBFURSDUgFcURTFoFQAVxRFMSgVwBUlSEKIQa3HoChTqQCuKIpiUOE81FhRNCeE+CegS0r5bf/X/wx0AO/3/74J33b/M8Dn8J3GfruU8pIQohj4L3zvk+c1GL6izEnNwJVo9xj+7eNCCBO+bpeXgY34AvZ64IPAGv+ZkY8Cn/U/9tvAD6SU24H2CI9bUealArgS1aSUDUC3EGIzcCO+rf3dwDF/3+wx4BIQaHl7Bijy/3k3b/X++GmkxqwowVIpFCUWPIrvNJpc4HH/bVN7s3infO3l7e8L1WtC0S01A1diwW+Bm4HtwAsLeNxBfCkXgL8I9aAUZalUAFeinpRyHHgF+IWU0rOAh34O+IwQ4hiQGpbBKcoSqG6EStTzL16ewNc+VR1IoEQNNQNXopoQYi1QC+xXwVuJNmoGriiKYlBqBq4oimJQKoAriqIYlArgiqIoBqUCuKIoikGpAK4oimJQKoAriqIY1P8DuDzf3v2QEAkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df.plot()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 方法1：pandas.Series.pct_change\n",
    "\n",
    "pct_change方法直接算好了\"(新-旧)/旧\"的百分比\n",
    "\n",
    "官方文档地址：https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.pct_change.html"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "df[\"bWendu_way1_huanbi\"] = df[\"bWendu\"].pct_change(periods=1)\n",
    "df[\"bWendu_way1_tongbi\"] = df[\"bWendu\"].pct_change(periods=12)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bWendu</th>\n",
       "      <th>bWendu_way1_huanbi</th>\n",
       "      <th>bWendu_way1_tongbi</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ymd</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>2017-01-31</td>\n",
       "      <td>3.322581</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-02-28</td>\n",
       "      <td>7.642857</td>\n",
       "      <td>1.300277</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-03-31</td>\n",
       "      <td>14.129032</td>\n",
       "      <td>0.848658</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-04-30</td>\n",
       "      <td>23.700000</td>\n",
       "      <td>0.677397</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-05-31</td>\n",
       "      <td>29.774194</td>\n",
       "      <td>0.256295</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-06-30</td>\n",
       "      <td>30.966667</td>\n",
       "      <td>0.040051</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-07-31</td>\n",
       "      <td>31.612903</td>\n",
       "      <td>0.020869</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-08-31</td>\n",
       "      <td>30.129032</td>\n",
       "      <td>-0.046939</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-09-30</td>\n",
       "      <td>27.866667</td>\n",
       "      <td>-0.075089</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-10-31</td>\n",
       "      <td>17.225806</td>\n",
       "      <td>-0.381849</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-11-30</td>\n",
       "      <td>9.566667</td>\n",
       "      <td>-0.444632</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-12-31</td>\n",
       "      <td>4.483871</td>\n",
       "      <td>-0.531303</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-01-31</td>\n",
       "      <td>1.322581</td>\n",
       "      <td>-0.705036</td>\n",
       "      <td>-0.601942</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-02-28</td>\n",
       "      <td>4.892857</td>\n",
       "      <td>2.699477</td>\n",
       "      <td>-0.359813</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-03-31</td>\n",
       "      <td>14.129032</td>\n",
       "      <td>1.887685</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               bWendu  bWendu_way1_huanbi  bWendu_way1_tongbi\n",
       "ymd                                                          \n",
       "2017-01-31   3.322581                 NaN                 NaN\n",
       "2017-02-28   7.642857            1.300277                 NaN\n",
       "2017-03-31  14.129032            0.848658                 NaN\n",
       "2017-04-30  23.700000            0.677397                 NaN\n",
       "2017-05-31  29.774194            0.256295                 NaN\n",
       "2017-06-30  30.966667            0.040051                 NaN\n",
       "2017-07-31  31.612903            0.020869                 NaN\n",
       "2017-08-31  30.129032           -0.046939                 NaN\n",
       "2017-09-30  27.866667           -0.075089                 NaN\n",
       "2017-10-31  17.225806           -0.381849                 NaN\n",
       "2017-11-30   9.566667           -0.444632                 NaN\n",
       "2017-12-31   4.483871           -0.531303                 NaN\n",
       "2018-01-31   1.322581           -0.705036           -0.601942\n",
       "2018-02-28   4.892857            2.699477           -0.359813\n",
       "2018-03-31  14.129032            1.887685            0.000000"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head(15)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 方法2：pandas.Series.shift\n",
    "\n",
    "shift用于移动数据，但是保持索引不变\n",
    "\n",
    "官方文档地址：https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.shift.html"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bWendu</th>\n",
       "      <th>bWendu</th>\n",
       "      <th>bWendu</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ymd</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>2017-01-31</td>\n",
       "      <td>3.322581</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-02-28</td>\n",
       "      <td>7.642857</td>\n",
       "      <td>3.322581</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-03-31</td>\n",
       "      <td>14.129032</td>\n",
       "      <td>7.642857</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-04-30</td>\n",
       "      <td>23.700000</td>\n",
       "      <td>14.129032</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-05-31</td>\n",
       "      <td>29.774194</td>\n",
       "      <td>23.700000</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-06-30</td>\n",
       "      <td>30.966667</td>\n",
       "      <td>29.774194</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-07-31</td>\n",
       "      <td>31.612903</td>\n",
       "      <td>30.966667</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-08-31</td>\n",
       "      <td>30.129032</td>\n",
       "      <td>31.612903</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-09-30</td>\n",
       "      <td>27.866667</td>\n",
       "      <td>30.129032</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-10-31</td>\n",
       "      <td>17.225806</td>\n",
       "      <td>27.866667</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-11-30</td>\n",
       "      <td>9.566667</td>\n",
       "      <td>17.225806</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-12-31</td>\n",
       "      <td>4.483871</td>\n",
       "      <td>9.566667</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-01-31</td>\n",
       "      <td>1.322581</td>\n",
       "      <td>4.483871</td>\n",
       "      <td>3.322581</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-02-28</td>\n",
       "      <td>4.892857</td>\n",
       "      <td>1.322581</td>\n",
       "      <td>7.642857</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-03-31</td>\n",
       "      <td>14.129032</td>\n",
       "      <td>4.892857</td>\n",
       "      <td>14.129032</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               bWendu     bWendu     bWendu\n",
       "ymd                                        \n",
       "2017-01-31   3.322581        NaN        NaN\n",
       "2017-02-28   7.642857   3.322581        NaN\n",
       "2017-03-31  14.129032   7.642857        NaN\n",
       "2017-04-30  23.700000  14.129032        NaN\n",
       "2017-05-31  29.774194  23.700000        NaN\n",
       "2017-06-30  30.966667  29.774194        NaN\n",
       "2017-07-31  31.612903  30.966667        NaN\n",
       "2017-08-31  30.129032  31.612903        NaN\n",
       "2017-09-30  27.866667  30.129032        NaN\n",
       "2017-10-31  17.225806  27.866667        NaN\n",
       "2017-11-30   9.566667  17.225806        NaN\n",
       "2017-12-31   4.483871   9.566667        NaN\n",
       "2018-01-31   1.322581   4.483871   3.322581\n",
       "2018-02-28   4.892857   1.322581   7.642857\n",
       "2018-03-31  14.129032   4.892857  14.129032"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 见识一下shift做了什么事情\n",
    "# 使用pd.concat合并Series列表变成一个大的df\n",
    "pd.concat(\n",
    "    [df[\"bWendu\"], \n",
    "     df[\"bWendu\"].shift(periods=1), \n",
    "     df[\"bWendu\"].shift(periods=12)],\n",
    "    axis=1\n",
    ").head(15)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 环比\n",
    "series_shift1 = df[\"bWendu\"].shift(periods=1)\n",
    "df[\"bWendu_way2_huanbi\"] = (df[\"bWendu\"]-series_shift1)/series_shift1\n",
    "\n",
    "# 同比\n",
    "series_shift2 = df[\"bWendu\"].shift(periods=12)\n",
    "df[\"bWendu_way2_tongbi\"] = (df[\"bWendu\"]-series_shift2)/series_shift2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bWendu</th>\n",
       "      <th>bWendu_way1_huanbi</th>\n",
       "      <th>bWendu_way1_tongbi</th>\n",
       "      <th>bWendu_way2_huanbi</th>\n",
       "      <th>bWendu_way2_tongbi</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ymd</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>2017-01-31</td>\n",
       "      <td>3.322581</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-02-28</td>\n",
       "      <td>7.642857</td>\n",
       "      <td>1.300277</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.300277</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-03-31</td>\n",
       "      <td>14.129032</td>\n",
       "      <td>0.848658</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.848658</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-04-30</td>\n",
       "      <td>23.700000</td>\n",
       "      <td>0.677397</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.677397</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-05-31</td>\n",
       "      <td>29.774194</td>\n",
       "      <td>0.256295</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.256295</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-06-30</td>\n",
       "      <td>30.966667</td>\n",
       "      <td>0.040051</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.040051</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-07-31</td>\n",
       "      <td>31.612903</td>\n",
       "      <td>0.020869</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.020869</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-08-31</td>\n",
       "      <td>30.129032</td>\n",
       "      <td>-0.046939</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.046939</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-09-30</td>\n",
       "      <td>27.866667</td>\n",
       "      <td>-0.075089</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.075089</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-10-31</td>\n",
       "      <td>17.225806</td>\n",
       "      <td>-0.381849</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.381849</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-11-30</td>\n",
       "      <td>9.566667</td>\n",
       "      <td>-0.444632</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.444632</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-12-31</td>\n",
       "      <td>4.483871</td>\n",
       "      <td>-0.531303</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.531303</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-01-31</td>\n",
       "      <td>1.322581</td>\n",
       "      <td>-0.705036</td>\n",
       "      <td>-0.601942</td>\n",
       "      <td>-0.705036</td>\n",
       "      <td>-0.601942</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-02-28</td>\n",
       "      <td>4.892857</td>\n",
       "      <td>2.699477</td>\n",
       "      <td>-0.359813</td>\n",
       "      <td>2.699477</td>\n",
       "      <td>-0.359813</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-03-31</td>\n",
       "      <td>14.129032</td>\n",
       "      <td>1.887685</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.887685</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               bWendu  bWendu_way1_huanbi  bWendu_way1_tongbi  \\\n",
       "ymd                                                             \n",
       "2017-01-31   3.322581                 NaN                 NaN   \n",
       "2017-02-28   7.642857            1.300277                 NaN   \n",
       "2017-03-31  14.129032            0.848658                 NaN   \n",
       "2017-04-30  23.700000            0.677397                 NaN   \n",
       "2017-05-31  29.774194            0.256295                 NaN   \n",
       "2017-06-30  30.966667            0.040051                 NaN   \n",
       "2017-07-31  31.612903            0.020869                 NaN   \n",
       "2017-08-31  30.129032           -0.046939                 NaN   \n",
       "2017-09-30  27.866667           -0.075089                 NaN   \n",
       "2017-10-31  17.225806           -0.381849                 NaN   \n",
       "2017-11-30   9.566667           -0.444632                 NaN   \n",
       "2017-12-31   4.483871           -0.531303                 NaN   \n",
       "2018-01-31   1.322581           -0.705036           -0.601942   \n",
       "2018-02-28   4.892857            2.699477           -0.359813   \n",
       "2018-03-31  14.129032            1.887685            0.000000   \n",
       "\n",
       "            bWendu_way2_huanbi  bWendu_way2_tongbi  \n",
       "ymd                                                 \n",
       "2017-01-31                 NaN                 NaN  \n",
       "2017-02-28            1.300277                 NaN  \n",
       "2017-03-31            0.848658                 NaN  \n",
       "2017-04-30            0.677397                 NaN  \n",
       "2017-05-31            0.256295                 NaN  \n",
       "2017-06-30            0.040051                 NaN  \n",
       "2017-07-31            0.020869                 NaN  \n",
       "2017-08-31           -0.046939                 NaN  \n",
       "2017-09-30           -0.075089                 NaN  \n",
       "2017-10-31           -0.381849                 NaN  \n",
       "2017-11-30           -0.444632                 NaN  \n",
       "2017-12-31           -0.531303                 NaN  \n",
       "2018-01-31           -0.705036           -0.601942  \n",
       "2018-02-28            2.699477           -0.359813  \n",
       "2018-03-31            1.887685            0.000000  "
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head(15)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 方法3. pandas.Series.diff\n",
    "\n",
    "pandas.Series.diff用于新值减去旧值\n",
    "\n",
    "官方文档：https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.diff.html"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bWendu</th>\n",
       "      <th>bWendu</th>\n",
       "      <th>bWendu</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ymd</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>2017-01-31</td>\n",
       "      <td>3.322581</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-02-28</td>\n",
       "      <td>7.642857</td>\n",
       "      <td>4.320276</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-03-31</td>\n",
       "      <td>14.129032</td>\n",
       "      <td>6.486175</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-04-30</td>\n",
       "      <td>23.700000</td>\n",
       "      <td>9.570968</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-05-31</td>\n",
       "      <td>29.774194</td>\n",
       "      <td>6.074194</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-06-30</td>\n",
       "      <td>30.966667</td>\n",
       "      <td>1.192473</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-07-31</td>\n",
       "      <td>31.612903</td>\n",
       "      <td>0.646237</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-08-31</td>\n",
       "      <td>30.129032</td>\n",
       "      <td>-1.483871</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-09-30</td>\n",
       "      <td>27.866667</td>\n",
       "      <td>-2.262366</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-10-31</td>\n",
       "      <td>17.225806</td>\n",
       "      <td>-10.640860</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-11-30</td>\n",
       "      <td>9.566667</td>\n",
       "      <td>-7.659140</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-12-31</td>\n",
       "      <td>4.483871</td>\n",
       "      <td>-5.082796</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-01-31</td>\n",
       "      <td>1.322581</td>\n",
       "      <td>-3.161290</td>\n",
       "      <td>-2.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-02-28</td>\n",
       "      <td>4.892857</td>\n",
       "      <td>3.570276</td>\n",
       "      <td>-2.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-03-31</td>\n",
       "      <td>14.129032</td>\n",
       "      <td>9.236175</td>\n",
       "      <td>0.00</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               bWendu     bWendu  bWendu\n",
       "ymd                                     \n",
       "2017-01-31   3.322581        NaN     NaN\n",
       "2017-02-28   7.642857   4.320276     NaN\n",
       "2017-03-31  14.129032   6.486175     NaN\n",
       "2017-04-30  23.700000   9.570968     NaN\n",
       "2017-05-31  29.774194   6.074194     NaN\n",
       "2017-06-30  30.966667   1.192473     NaN\n",
       "2017-07-31  31.612903   0.646237     NaN\n",
       "2017-08-31  30.129032  -1.483871     NaN\n",
       "2017-09-30  27.866667  -2.262366     NaN\n",
       "2017-10-31  17.225806 -10.640860     NaN\n",
       "2017-11-30   9.566667  -7.659140     NaN\n",
       "2017-12-31   4.483871  -5.082796     NaN\n",
       "2018-01-31   1.322581  -3.161290   -2.00\n",
       "2018-02-28   4.892857   3.570276   -2.75\n",
       "2018-03-31  14.129032   9.236175    0.00"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.concat(\n",
    "    [df[\"bWendu\"], \n",
    "     df[\"bWendu\"].diff(periods=1), \n",
    "     df[\"bWendu\"].diff(periods=12)],\n",
    "    axis=1\n",
    ").head(15)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 环比\n",
    "series_diff1 = df[\"bWendu\"].diff(periods=1)\n",
    "df[\"bWendu_way3_huanbi\"] = series_diff1/(df[\"bWendu\"]-series_diff1)\n",
    "\n",
    "# 同比\n",
    "series_diff2 = df[\"bWendu\"].diff(periods=12)\n",
    "df[\"bWendu_way3_tongbi\"] = series_diff2/(df[\"bWendu\"]-series_diff2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>bWendu</th>\n",
       "      <th>bWendu_way1_huanbi</th>\n",
       "      <th>bWendu_way1_tongbi</th>\n",
       "      <th>bWendu_way2_huanbi</th>\n",
       "      <th>bWendu_way2_tongbi</th>\n",
       "      <th>bWendu_way3_huanbi</th>\n",
       "      <th>bWendu_way3_tongbi</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ymd</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>2017-01-31</td>\n",
       "      <td>3.322581</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-02-28</td>\n",
       "      <td>7.642857</td>\n",
       "      <td>1.300277</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.300277</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1.300277</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-03-31</td>\n",
       "      <td>14.129032</td>\n",
       "      <td>0.848658</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.848658</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.848658</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-04-30</td>\n",
       "      <td>23.700000</td>\n",
       "      <td>0.677397</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.677397</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.677397</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-05-31</td>\n",
       "      <td>29.774194</td>\n",
       "      <td>0.256295</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.256295</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.256295</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-06-30</td>\n",
       "      <td>30.966667</td>\n",
       "      <td>0.040051</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.040051</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.040051</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-07-31</td>\n",
       "      <td>31.612903</td>\n",
       "      <td>0.020869</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.020869</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.020869</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-08-31</td>\n",
       "      <td>30.129032</td>\n",
       "      <td>-0.046939</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.046939</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.046939</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-09-30</td>\n",
       "      <td>27.866667</td>\n",
       "      <td>-0.075089</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.075089</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.075089</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-10-31</td>\n",
       "      <td>17.225806</td>\n",
       "      <td>-0.381849</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.381849</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.381849</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-11-30</td>\n",
       "      <td>9.566667</td>\n",
       "      <td>-0.444632</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.444632</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.444632</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2017-12-31</td>\n",
       "      <td>4.483871</td>\n",
       "      <td>-0.531303</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.531303</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.531303</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-01-31</td>\n",
       "      <td>1.322581</td>\n",
       "      <td>-0.705036</td>\n",
       "      <td>-0.601942</td>\n",
       "      <td>-0.705036</td>\n",
       "      <td>-0.601942</td>\n",
       "      <td>-0.705036</td>\n",
       "      <td>-0.601942</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-02-28</td>\n",
       "      <td>4.892857</td>\n",
       "      <td>2.699477</td>\n",
       "      <td>-0.359813</td>\n",
       "      <td>2.699477</td>\n",
       "      <td>-0.359813</td>\n",
       "      <td>2.699477</td>\n",
       "      <td>-0.359813</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2018-03-31</td>\n",
       "      <td>14.129032</td>\n",
       "      <td>1.887685</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.887685</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>1.887685</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               bWendu  bWendu_way1_huanbi  bWendu_way1_tongbi  \\\n",
       "ymd                                                             \n",
       "2017-01-31   3.322581                 NaN                 NaN   \n",
       "2017-02-28   7.642857            1.300277                 NaN   \n",
       "2017-03-31  14.129032            0.848658                 NaN   \n",
       "2017-04-30  23.700000            0.677397                 NaN   \n",
       "2017-05-31  29.774194            0.256295                 NaN   \n",
       "2017-06-30  30.966667            0.040051                 NaN   \n",
       "2017-07-31  31.612903            0.020869                 NaN   \n",
       "2017-08-31  30.129032           -0.046939                 NaN   \n",
       "2017-09-30  27.866667           -0.075089                 NaN   \n",
       "2017-10-31  17.225806           -0.381849                 NaN   \n",
       "2017-11-30   9.566667           -0.444632                 NaN   \n",
       "2017-12-31   4.483871           -0.531303                 NaN   \n",
       "2018-01-31   1.322581           -0.705036           -0.601942   \n",
       "2018-02-28   4.892857            2.699477           -0.359813   \n",
       "2018-03-31  14.129032            1.887685            0.000000   \n",
       "\n",
       "            bWendu_way2_huanbi  bWendu_way2_tongbi  bWendu_way3_huanbi  \\\n",
       "ymd                                                                      \n",
       "2017-01-31                 NaN                 NaN                 NaN   \n",
       "2017-02-28            1.300277                 NaN            1.300277   \n",
       "2017-03-31            0.848658                 NaN            0.848658   \n",
       "2017-04-30            0.677397                 NaN            0.677397   \n",
       "2017-05-31            0.256295                 NaN            0.256295   \n",
       "2017-06-30            0.040051                 NaN            0.040051   \n",
       "2017-07-31            0.020869                 NaN            0.020869   \n",
       "2017-08-31           -0.046939                 NaN           -0.046939   \n",
       "2017-09-30           -0.075089                 NaN           -0.075089   \n",
       "2017-10-31           -0.381849                 NaN           -0.381849   \n",
       "2017-11-30           -0.444632                 NaN           -0.444632   \n",
       "2017-12-31           -0.531303                 NaN           -0.531303   \n",
       "2018-01-31           -0.705036           -0.601942           -0.705036   \n",
       "2018-02-28            2.699477           -0.359813            2.699477   \n",
       "2018-03-31            1.887685            0.000000            1.887685   \n",
       "\n",
       "            bWendu_way3_tongbi  \n",
       "ymd                             \n",
       "2017-01-31                 NaN  \n",
       "2017-02-28                 NaN  \n",
       "2017-03-31                 NaN  \n",
       "2017-04-30                 NaN  \n",
       "2017-05-31                 NaN  \n",
       "2017-06-30                 NaN  \n",
       "2017-07-31                 NaN  \n",
       "2017-08-31                 NaN  \n",
       "2017-09-30                 NaN  \n",
       "2017-10-31                 NaN  \n",
       "2017-11-30                 NaN  \n",
       "2017-12-31                 NaN  \n",
       "2018-01-31           -0.601942  \n",
       "2018-02-28           -0.359813  \n",
       "2018-03-31            0.000000  "
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head(15)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
